﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Facebook.Schema;
using System.ServiceModel;
using CityLife.CityService;
using System.Collections.Generic;

namespace CityLife
{
	public partial class Neighbours : UserControl
	{

        //public ListBox NeighboursListbox
        //{
        // get{return this.NeighboursListbox;}   
        //}

        public Neighbours()
		{
			// Required to initialize variables
			InitializeComponent();

           
		}



        public void GetNeighboursScore()
        {

            List<long> list = new List<long>();
            foreach (Neighbour u in NeighboursListbox.Items)
            {
                list.Add(Convert.ToInt64(u.NeighbourId));
            }


            ICityService cityService = new ChannelFactory<ICityService>("BasicHttpBinding_ICityService").CreateChannel();
            //+
            AsyncCallback asyncCallBack = delegate(IAsyncResult result)
            {

                


            };

            cityService.BeginGetNeighbours(list, asyncCallBack, cityService);


           


        }


	}
}